From: Marco Trevisan (TreviƱo) Date: Mon, 11 Mar 2019 20:36:55 +0000 (+0000) Subject: magnifier: Return all parameters on sprite content preferred size X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~871^2^2~11 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7eee0e0ed6a6c027645fbc7a6cf629b73da3a7a5;p=gnome-shell.git magnifier: Return all parameters on sprite content preferred size ClutterContent's get_preferred_size should return a boolean weather the preferred size is valid, so in javascript we've to return this state value before out width and height. Since this was not happening, clutter was considering the width as the state (converting the non-zero value to true), the height as the width, while ignoring the returned height (that was then defaulted to 0) Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1020 --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index ba7227d67..4a21b71e5 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -56,9 +56,9 @@ var MouseSpriteContent = GObject.registerClass({ vfunc_get_preferred_size() { if (!this._texture) - return [0, 0]; + return [false, 0, 0]; - return [this._texture.get_width(), this._texture.get_height()]; + return [true, this._texture.get_width(), this._texture.get_height()]; } vfunc_paint_content(actor, node) {